package chapter11.section4;

/* Account：模拟账户的类*/
public class Account {
    private String name;
    private int balance;

    public Account(String name, int balance) {
        this.name = name;
        this.balance = balance;
    }
    //todo，这里省略了此类每个属性的getter和setter方法，请添加完整保证运行正确

    @Override
    public String toString() {
        return "Account [name=" + name + ", balance=" + balance + "]";
    }

    /**
     * @return the name
     */
    public String getName() {
        return name;
    }

    /**
     * @param name the name to set
     */
    public void setName(String name) {
        this.name = name;
    }

    /**
     * @return the balance
     */
    public int getBalance() {
        return balance;
    }

    /**
     * @param balance the balance to set
     */
    public void setBalance(int balance) {
        this.balance = balance;
    }
}
